package com.yidu.ladder.system.controller;

import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import com.yidu.ladder.system.domain.LogVo;
import com.yidu.ladder.system.service.LogService;

/**
 * 日志控制器
 * @author bamboo
 *
 */
@Controller
@RequestMapping("/system/log/")
public class LogController {
	
	@Autowired
	private LogService logService;
	/**
	 * 得到日志service
	 * @return 日志service
	 */
	public LogService getLogService() {
		return logService;
	}
	/**
	 * 设置日志service
	 * @param logService 日志service
	 */
	public void setLogService(LogService logService) {
		this.logService = logService;
	}

	/**
	 * 查询日志
	 * @param logVo 日志包装类
	 * @return 查询到的数据
	 */
	@ResponseBody
	@RequestMapping(value="logs",method=RequestMethod.GET)
	public Map<String, Object> queryLog(LogVo logVo){
		//调用分页查询方法并返回
		return logService.pageQueryLog(logVo);
	}
	
	
	
}
